<template>
    <div class="bigbox">
        <el-form :inline="false" :model="formInline" class="demo-form-inline" style="width: 300px;">
            <el-form-item label="登记日期">
                <el-date-picker
                    v-model="formInline.date"
                    type="date"
                    placeholder="Pick a date"
                    clearable
                />
            </el-form-item>
            <el-form-item label="家属姓名">
                <el-input v-model="formInline.user" placeholder="请输入" clearable />
            </el-form-item>
            <el-form-item >
                <el-button type="primary">新增药品</el-button>
            </el-form-item>
        </el-form>
        <el-table :data="tableData" style="width: 100%">
            <el-table-column prop="date" label="序号" width="180" />
            <el-table-column prop="name" label="药品名称" width="180" />
            <el-table-column prop="name" label="数量" width="180" />
            <el-table-column prop="name" label="有效期" width="180" />
            <el-table-column prop="name" label="剂量" width="180" />
            <el-table-column prop="name" label="服法" width="180" />
            <el-table-column prop="address" label="操作" />
        </el-table>
        <el-form>
            <el-form-item >
                <el-button type="primary">保存</el-button>
                <el-button @click="backed">取消</el-button>
            </el-form-item>
        </el-form>
    </div>
</template>

<script setup lang="ts">
import router from '@/router';
import { reactive } from 'vue';

const backed=()=>{
  router.back()
}

const formInline = reactive({
  user: '',
  region: '',
  date: '',
})

const tableData = [
  {
    date: '2016-05-03',
    name: 'Tom',
    address: 'No. 189, Grove St, Los Angeles',
  },
  {
    date: '2016-05-02',
    name: 'Tom',
    address: 'No. 189, Grove St, Los Angeles',
  },
  {
    date: '2016-05-04',
    name: 'Tom',
    address: 'No. 189, Grove St, Los Angeles',
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: 'No. 189, Grove St, Los Angeles',
  },
]
</script>

<style scoped>
.bigbox{
    background-color: #fff;
    padding: 20px;
}
</style>